package com.sinosoft.ebusiness.domain.elementManage;
// 采用工具 Hibernate Tools 3.2.4.GA (sinosoft version) 生成，请勿手工修改。

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * POJO类GeRationId
 */
@Embeddable
public class GeRationId implements java.io.Serializable {

	/**
	 * 
	 */
	/** 属性定额类型代码 */
	private String rationType;

	/** 属性险种代码 */
	private String riskCode;

	/** 属性险别代码 */
	private String kindCode;

	/** 属性标的项目类别代码 */
	private String itemCode;

	/** 属性机构代码 */
	private String comCode;

	/** 属性term */
	private short term;

	/**
	 * 类GeRationId的默认构造方法
	 */
	public GeRationId() {
	}

	/**
	 * 属性定额类型代码的getter方法
	 */

	@Column(name = "RATIONTYPE")
	public String getRationType() {
		return this.rationType;
	}

	/**
	 * 属性定额类型代码的setter方法
	 */
	public void setRationType(String rationType) {
		this.rationType = rationType;
	}

	/**
	 * 属性险种代码的getter方法
	 */

	@Column(name = "RISKCODE")
	public String getRiskCode() {
		return this.riskCode;
	}

	/**
	 * 属性险种代码的setter方法
	 */
	public void setRiskCode(String riskCode) {
		this.riskCode = riskCode;
	}

	/**
	 * 属性险别代码的getter方法
	 */

	@Column(name = "KINDCODE")
	public String getKindCode() {
		return this.kindCode;
	}

	/**
	 * 属性险别代码的setter方法
	 */
	public void setKindCode(String kindCode) {
		this.kindCode = kindCode;
	}

	/**
	 * 属性标的项目类别代码的getter方法
	 */

	@Column(name = "ITEMCODE")
	public String getItemCode() {
		return this.itemCode;
	}

	/**
	 * 属性标的项目类别代码的setter方法
	 */
	public void setItemCode(String itemCode) {
		this.itemCode = itemCode;
	}

	/**
	 * 属性机构代码的getter方法
	 */

	@Column(name = "COMCODE")
	public String getComCode() {
		return this.comCode;
	}

	/**
	 * 属性机构代码的setter方法
	 */
	public void setComCode(String comCode) {
		this.comCode = comCode;
	}

	/**
	 * 属性term的getter方法
	 */

	@Column(name = "TERM")
	public short getTerm() {
		return this.term;
	}

	/**
	 * 属性term的setter方法
	 */
	public void setTerm(short term) {
		this.term = term;
	}

	public boolean equals(Object other) {
		if ((this == other)) {
			return true;
		}
		if ((other == null)) {
			return false;
		}
		if (!(other instanceof GeRationId)) {
			return false;
		}
		GeRationId castOther = (GeRationId) other;

		return ((this.getRationType() == castOther.getRationType()) || (this
				.getRationType() != null && castOther.getRationType() != null && this
				.getRationType().equals(castOther.getRationType())))
				&& ((this.getRiskCode() == castOther.getRiskCode()) || (this
						.getRiskCode() != null
						&& castOther.getRiskCode() != null && this
						.getRiskCode().equals(castOther.getRiskCode())))
				&& ((this.getKindCode() == castOther.getKindCode()) || (this
						.getKindCode() != null
						&& castOther.getKindCode() != null && this
						.getKindCode().equals(castOther.getKindCode())))
				&& ((this.getItemCode() == castOther.getItemCode()) || (this
						.getItemCode() != null
						&& castOther.getItemCode() != null && this
						.getItemCode().equals(castOther.getItemCode())))
				&& ((this.getComCode() == castOther.getComCode()) || (this
						.getComCode() != null && castOther.getComCode() != null && this
						.getComCode().equals(castOther.getComCode())))
				&& (this.getTerm() == castOther.getTerm());
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getRationType() == null ? 0 : this.getRationType()
						.hashCode());
		result = 37 * result
				+ (getRiskCode() == null ? 0 : this.getRiskCode().hashCode());
		result = 37 * result
				+ (getKindCode() == null ? 0 : this.getKindCode().hashCode());
		result = 37 * result
				+ (getItemCode() == null ? 0 : this.getItemCode().hashCode());
		result = 37 * result
				+ (getComCode() == null ? 0 : this.getComCode().hashCode());
		result = 37 * result + this.getTerm();
		return result;
	}

}
